Skip to content

Handle transcipt stable IDs - #43

Merged
bilalebi merged 1 commit into
mainfrom
support-trans-stable-id
Aug 17, 2026
Merged

bilalebi merged 1 commit into
mainfrom
support-trans-stable-id

Conversation

@bilalebi

@bilalebi bilalebi commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Make the transcript stable IDs findable in /id/{stable_id} endpoint

Before

Query

https://resolver.ensembl.org/id/ENSTJET00000010396

Response

{"status_code": 404, "details": "Not Found"}

After

Query

http://localhost:8001/id/ENSTJET00000010396

Response

[
  {
    "assembly": {
      "name": "iyAndPrae1.1",
      "accession_id": "GCA_963932275.1"
    },
    "scientific_name": "Andrena praecox",
    "common_name": null,
    "type": null,
    "is_reference": false,
    "stable_id_type": "transcript",
    "feature_explorer_url": "http://www.ensembl.org/feature-explorer/0a222fd5-5452-4530-b439-fdcbfb984ae1/transcript:ENSTJET00000010396",
    "genome_browser_url": "http://www.ensembl.org/genome-browser/0a222fd5-5452-4530-b439-fdcbfb984ae1?focus=transcript:ENSTJET00000010396",
    "release_type": "integrated",
    "release_name": "2026-07"
  }
]

Also

http://localhost:8001/id/ENSTJET00000010396?type=gene

Returns

{"status_code": 404, "details": "Not Found"}

JIRA Ticket

https://embl.atlassian.net/browse/ENSPLAT-287


Questions

Interestingly the code changes assume the protein feature explorer and genome browser links are similar to gene and transcript (which I know it's not correct), for example:

Query:

http://localhost:8001/id/ENSWGJP00000002679?type=protein

Returns:

[
  {
    "assembly": {
      "name": "iyPimRufi1.1",
      "accession_id": "GCA_963932165.1"
    },
    "scientific_name": "Pimpla rufipes",
    "common_name": null,
    "type": null,
    "is_reference": false,
    "stable_id_type": "protein",
    "feature_explorer_url": "http://www.ensembl.org/feature-explorer/010ac724-e482-4d86-b40c-c756b2ed2271/protein:ENSWGJP00000002679",
    "genome_browser_url": "http://www.ensembl.org/genome-browser/010ac724-e482-4d86-b40c-c756b2ed2271?focus=protein:ENSWGJP00000002679",
    "release_type": "integrated",
    "release_name": "2026-07"
  }
]
  1. Will we ever have such views?
  1. This PR doesn't handle proteins yet because it requires changes in the fm_stable_ids_extractor as well as re-indexing

To construct an appropriate destination URL, the Resolver needs to know the transcript associated with the protein.
The proposed solution as mentioned in JIRA ticket is to extend /id to resolve protein stable IDs, including the required changes to the MongoDB extraction and redb generation process.

For example adding which transcript is associated to each protein, for example this:

ENSWGJP00000002679
Hit! ENSWGJP00000002679
Value: 010ac724-e482-4d86-b40c-c756b2ed2271|protein

Eventually becomes

ENSWGJP00000002679
Hit! ENSWGJP00000002679
Value: 010ac724-e482-4d86-b40c-c756b2ed2271|protein|TRASCRIPT_ID_GOES_HERE

That will work probably fine though I don't like it tbh, also this raises the question of how we would like to extend it later to include exons?

@bilalebi bilalebi self-assigned this Aug 16, 2026
@bilalebi
bilalebi merged commit 484db57 into main Aug 17, 2026
5 checks passed
@bilalebi
bilalebi deleted the support-trans-stable-id branch October 26, 2026 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant